package com.reform.controller.project;


import com.reform.res.Result;
import com.reform.service.IViewProjectMemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.sql.SQLException;

/**
 * <p>
 * VIEW 前端控制器
 * </p>
 *
 * @author mortale
 * @since 2021-10-18
 */
@Api(tags = "ViewProjectMemberController")
@RestController
@RequestMapping("/view-project-member")
public class ViewProjectMemberController {

    @Autowired
    IViewProjectMemberService viewProjectMemberService;

    @ApiOperation(value = "获取当前所有非暂存的项目信息（只有主持人）", notes = "获取当前所有非暂存的项目信息")
    @GetMapping("/getAllTemporaryProject")
    public Result getAllTemporaryProject() {
        return viewProjectMemberService.getAllTemporaryProject();
    }

    @ApiOperation(value = "根据教师信息获取指定学院的非暂存项目信息", notes = "获取指定学院的非暂存项目信息")
    @GetMapping("/getNotTemporaryProject")
    public Result getNotTemporaryProject(HttpServletRequest request) throws SQLException {
        return viewProjectMemberService.getNotTemporaryProject(request);
    }

}
